<template>
  <div>
    <div class="ls-card">
      <div class="normal nr m-b-20 weight-600">服务器信息</div>

      <el-table
          :data="environmentData.server_info"
          style="width: 100%"
          size="mini">
        <el-table-column
            prop="name"
            label="参数"
            width="280">
        </el-table-column>
        <el-table-column
            prop="value"
            label="值"
            width="300">
        </el-table-column>
        <el-table-column
            prop=""
            label="">
        </el-table-column>
      </el-table>
    </div>

    <div class="ls-card m-t-24">
      <div class="normal nr m-b-20 weight-600">PHP环境要求</div>

      <el-table
          :data="environmentData.php_env"
          style="width: 100%"
          size="mini">
        <el-table-column
            prop="name"
            label="参数"
            width="280">
        </el-table-column>
        <el-table-column
            prop="value"
            label="要求"
            width="300">
        </el-table-column>
        <el-table-column
            prop="status"
            label="状态">
          <template slot-scope="scope">
            <i v-if="scope.row.status === true" class="el-icon-check xxl" style="color: green"></i>
          </template>
        </el-table-column>
        <el-table-column
            prop="remark"
            label="说明及帮助">
        </el-table-column>
        <el-table-column
            prop=""
            label="">
        </el-table-column>
      </el-table>
    </div>
  </div>
</template>

<script lang="ts">
import { Component, Vue } from 'vue-property-decorator'
import { apiSystemSystemEnv } from '@/api/setting'

@Component
export default class Environment extends Vue {
  environmentData: Object = {};

  /** S Methods **/
  async getSystemEnvFunc (): Promise<void> {
    const res = await apiSystemSystemEnv()
    this.environmentData = res;
  }

  created () {
    this.getSystemEnvFunc()
  }
}
</script>
